<?php
namespace app\common\model;

use app\common\model\Account;

class ProjectLog extends Base
{
	protected $pk = 'id';
	// protected $table = 'think_user';

    public static  $type_txt = [
		'cancel'	=>	'取消订单',
		'return'	=>	'退货订单',
        'orderRemark'	=>	'未发货提醒',
        'orderRemarkReject'	=>	'未发货提醒',
        'orderRemarkChange'	=>	'未发货提醒',
	];

	public function getTypeAttr($value)
    {
        return self::$type_txt[$value];
    }

	public function getAccountIdAttr($value)
    {
		$account = Account::where('id',$value)->field('true_name')->find();
        return $account['true_name']?:'系统通知';
    }
	public function getAddTimeAttr($value)
    {
		$res = date('Y-m-d H:i',$value);
        return $res;
    }

}